<script type="text/javascript"> 
$(function(){
  // 画面快速切换
  $("select#slcGameListStr").change(function(){
    if($(this).val() == 0){
      location.replace('op.php?op=admin&fp=amount&id={id}&gametype=' + $(this).val());
    }else{
      location.replace('op.php?op=admin&fp=amount_3d&id={id}&gametype=' + $(this).val());
    }
  });
  
  // 快速变更钮
  $("input:button.btnChgData").click(function(){
    var sNo = $(this).parent("td").attr("id").substr(10,11);
    var oldval = "";
    var newval = "";
    var chkval = "";
    var tbdStr = "";
    var slcArr = new Array("A","B","C","D");
    var myTbd = "tbody#tbdList" + sNo;
    for (x in slcArr){
      i = x - 0 + 1;
      chkval = $("select#slc"+ slcArr[x] + sNo).val() - 0;
      tbdStr = myTbd + " input.tmpBack" + i + "[readonly!=true]";
      $(tbdStr).each(function(idx,ele){
        if(chkval != ""){
          oldval = $(ele).val() - 0;
          newval = oldval - 0 + (chkval);
          if(newval < 0){newval = 0; $(ele).css("background-color","#FDFF37");}
          else{$(ele).css("background-color","");}
          $(ele).val(check_float(newval));
        }
      }); 
    }
  });

  // 快速变更 - 清除钮
  $("input:button.btnClrData").click(function(){
    var sNo = $(this).parent("td").attr("id").substr(10,11);
    var myTd = "td#frmChgData" + sNo;
    $(myTd + " input:text").val("");
    $(myTd + " select").val("");
  });  
});

function check_float(num)
{
	var numv=num-0;
	var sign=(numv>=0?1:-1); // Will give 1 for num=0
	var numabs=numv*sign;
	var naint=Math.floor(numabs);
	var nacent=Math.round((numabs-naint)*100);
	if (nacent>=100) {nacent=0; naint++;}
	var nais=''+naint;
	var nacs=(nacent<10?'0':'')+nacent;
	if (naint+nacent==0) sign=1;
	return (sign==1?'':'-')+nais+'.'+nacs;
}
</script>

<form action="{action}" method="post" name="f">
<input type=hidden name=id value="{id}">

<table border=0 cellpadding=3 cellspacing=0>
<tr valign="top">
<td>
    <table border="0" cellspacing="1" cellpadding="0" class="tblMy3D">
    <tr>
      <td colspan=2 class="title0 bgClc_{gametype}" width="170" align="center">总监 {titodoc} 赚水设定</td>
    
    <tr>
      <td class="bgClc_{gametype}" align="center">帐号</tD>
      <td class=td2>{account}</td>
    </tr>
    <tr>
      <td class="bgClc_{gametype}" align="center">名称</tD>
      <td class=td2>{name}</td>
    </tr>
    </table>
</td>


<td>
<div>{err}</div>
<table border="0" cellspacing="1" cellpadding="1" class="tblMy3D" width="{myWidth}">
<thead style="background-color:#666666;color:#FFFFFF">
  <tr>
  <td class="title0 bgClc_{gametype}" colspan="8" style="color:#000000;padding:2px;">
  &nbsp;◎&nbsp;双面盘快调&nbsp;◎
  </td>
  </tr>
  <tr align="right">
  <td class="bgClc_{gametype}" colspan="8" style="color:#000000" id="frmChgData01">
  A 盘调整 <select id="slcA01" {disabled}><option value="">--</option><option value="1">1</option><option value="0.5">0.5</option><option value="0.1">0.1</option><option value="0.05">0.05</option><option value="0.01">0.01</option><option value="0">0</option><option value="-0.01">-0.01</option><option value="-0.05">-0.05</option><option value="-0.1">-0.1</option><option value="-0.5">-0.5</option><option value="-1">-1</option></select>
  B 盘调整 <select id="slcB01" {disabled}><option value="">--</option><option value="1">1</option><option value="0.5">0.5</option><option value="0.1">0.1</option><option value="0.05">0.05</option><option value="0.01">0.01</option><option value="0">0</option><option value="-0.01">-0.01</option><option value="-0.05">-0.05</option><option value="-0.1">-0.1</option><option value="-0.5">-0.5</option><option value="-1">-1</option></select>
  C 盘调整 <select id="slcC01" {disabled}><option value="">--</option><option value="1">1</option><option value="0.5">0.5</option><option value="0.1">0.1</option><option value="0.05">0.05</option><option value="0.01">0.01</option><option value="0">0</option><option value="-0.01">-0.01</option><option value="-0.05">-0.05</option><option value="-0.1">-0.1</option><option value="-0.5">-0.5</option><option value="-1">-1</option></select>
  D 盘调整 <select id="slcD01" {disabled}><option value="">--</option><option value="1">1</option><option value="0.5">0.5</option><option value="0.1">0.1</option><option value="0.05">0.05</option><option value="0.01">0.01</option><option value="0">0</option><option value="-0.01">-0.01</option><option value="-0.05">-0.05</option><option value="-0.1">-0.1</option><option value="-0.5">-0.5</option><option value="-1">-1</option></select>
  <input type="button" value="快速变更" class="btnChgData" />
  <input type="button" value="清除" class="btnClrData" />
  </td>
  </tr>
  <tr >
  <th rowspan="2" width="25%">玩法</th>
  <th colspan="4">盘口</th>
  <th rowspan="2">
  <input type="button" value="重读" onclick="location.replace('{url_reload}')"  />
  <input type="submit" value="{submit}">
  </th>
  </tr>
  
  <tr>
  <th>A 盘</th>
  <th>B 盘</th>
  <th>C 盘</th>
  <th>D 盘</th>
  </tr>
</thead>
<tbody id="tbdList01">
{tbdList1}
</tbody>
<tfoot  style="background-color:#666666;color:#FFFFFF">
  <tr>
  <th>玩法</th>
  <th colspan="4">盘口</th>
  <th>
  <input type="button" value="重读" onclick="location.replace('{url_reload}')"  />
  <input type="submit" value="{submit}">
  </th>
  </tr>
<tfoot>
</table>

<table border="0" cellspacing="1" cellpadding="1" class="tblMy3D" width="{myWidth}">
<thead style="background-color:#666666;color:#FFFFFF">
  <tr>
  <td class="title0 bgClc_{gametype}" colspan="8" style="color:#000000;padding:2px;">
  &nbsp;◎&nbsp;一般盘快调&nbsp;◎
  </td>
  </tr>
  <tr align="right">
  <td class="bgClc_{gametype}" colspan="8" style="color:#000000" id="frmChgData02">
  A 盘调整 <select id="slcA02" {disabled}><option value="">--</option><option value="1">1</option><option value="0.5">0.5</option><option value="0.1">0.1</option><option value="0.05">0.05</option><option value="0.01">0.01</option><option value="0">0</option><option value="-0.01">-0.01</option><option value="-0.05">-0.05</option><option value="-0.1">-0.1</option><option value="-0.5">-0.5</option><option value="-1">-1</option></select>
  B 盘调整 <select id="slcB02" {disabled}><option value="">--</option><option value="1">1</option><option value="0.5">0.5</option><option value="0.1">0.1</option><option value="0.05">0.05</option><option value="0.01">0.01</option><option value="0">0</option><option value="-0.01">-0.01</option><option value="-0.05">-0.05</option><option value="-0.1">-0.1</option><option value="-0.5">-0.5</option><option value="-1">-1</option></select>
  C 盘调整 <select id="slcC02" {disabled}><option value="">--</option><option value="1">1</option><option value="0.5">0.5</option><option value="0.1">0.1</option><option value="0.05">0.05</option><option value="0.01">0.01</option><option value="0">0</option><option value="-0.01">-0.01</option><option value="-0.05">-0.05</option><option value="-0.1">-0.1</option><option value="-0.5">-0.5</option><option value="-1">-1</option></select>
  D 盘调整 <select id="slcD02" {disabled}><option value="">--</option><option value="1">1</option><option value="0.5">0.5</option><option value="0.1">0.1</option><option value="0.05">0.05</option><option value="0.01">0.01</option><option value="0">0</option><option value="-0.01">-0.01</option><option value="-0.05">-0.05</option><option value="-0.1">-0.1</option><option value="-0.5">-0.5</option><option value="-1">-1</option></select>
  <input type="button" value="快速变更" class="btnChgData" />
  <input type="button" value="清除" class="btnClrData" />
  </td>
  </tr>
  
  <tr>
  <th rowspan="2" width="25%">玩法</th>
  <th colspan="4">盘口</th>
  <th rowspan="2">
  </th>
  </tr>
  
  <tr>
  <th>A 盘</th>
  <th>B 盘</th>
  <th>C 盘</th>
  <th>D 盘</th>
  </tr>
</thead>
<tbody id="tbdList02">
{tbdList2}
</tbody>
<tfoot  style="background-color:#666666;color:#FFFFFF">
  <tr>
  <th>玩法</th>
  <th colspan="4">盘口</th>
  <th>
  <input type="button" value="重读" onclick="location.replace('{url_reload}')"  />
  <input type="submit" value="{submit}">
  </th>
  </tr>
<tfoot>
</table>

</td>
</tr>
</table>

</form>   